package org.csmz.xg2333.Example16;
//控制设备
public class Dev {
    public String name;
    public Dev(String name){
        this.name = name;
    }
    public void printDev(){
        System.out.println("控制设备启用成功");
    }
    //成员内部类
    class Device{
        public String nameDev;
        public Device(String nameDev){
            this.nameDev = nameDev;
        }
        public void print1Device(){
            System.out.println(name+"控制"+nameDev+"开机");
        }
        public void print2Device(){
            System.out.println(name+"控制"+nameDev+"关机");
        }
    }
}
